package com.xsz.entity;

import lombok.Getter;
import lombok.Setter;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
import java.util.Set;

/**
 *
 * @author Bsea
 *  职位
 *
 */
@Table(name="tb_position")
@Entity
@Getter
@Setter
public class Position implements Serializable {
    private static final long serialVersionUID = 1L;
    /**主键ID**/
    @Id
    @Column(length=60)
    private String id;

    /**名称**/
    @Column(length=60)
    private String name;
    /**创建时间**/
    private Date createTime;
    /**
     *最少薪资
     */
    private Integer minSalary;
    /**
     *最多薪资
     */
    private  Integer maxSalary;

    /**工作城市**/
    @Column(length=60)
    private String city;

    /**工作详细地址**/
    private String address;

    /**发布职位公司名字**/
    private String companyName;

    /**工作详细描述**/
    private String detail;

    /**工作经验要求**/
    private Integer workedyears;


    /**学历要求**/
    private String education;


    /**创建职位企业的Id**/
    private String createBy;

    /**招聘人数**/
    private Integer requiredNum;


    private String skillList;// 一个职位，可以要求有多种技能


    @ManyToMany(fetch=FetchType.EAGER)//立即从数据库中进行加载数据;
    @JoinTable(name = "TbPossitionResume", joinColumns = { @JoinColumn(name = "pid") }, inverseJoinColumns
            ={@JoinColumn(name = "resumeId") })
    private List<Resume> resumeList;// 一个职位，可以收到多份简历


}
